package util;

import java.util.ArrayList;
import java.util.List;

public class Page {
//    select count(1) from sys_user
//    # totalCount总行数 记录查询数
    private int totalCount;

//    # totalPage总页数 考虑是否能整除 总行数%每页显示多少数据（pageSize）==0 ？总行数/pageSize ：总行数/pageSize+1
    private int totalPage;

//    # totalSize每页显示多少数据 固定值
    private int pageSize=10;

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage() {
        this.totalPage = totalCount%pageSize==0?totalCount/pageSize:totalCount/pageSize+1;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    //    # currentPage当前页
    private int currentPage;

//    List<T> list=new ArrayList<T>(0);//0为默认长度

}
